package com.hx.observer.guava;

import com.google.common.eventbus.EventBus;

/**
 * @author Huathy
 * @date 2021-09-14 22:19
 * @description
 */
public class GuavaTest {
    public static void main(String[] args) {
        //消息总线
        EventBus bus = new EventBus();
        GuavaEvent event = new GuavaEvent();
        //注册事件到消息总线
        bus.register(event);
        bus.post("tom");

        //从struts到springMVC的升级
        //struts面向类，SpringMvc面向方法

        //上面advice，event两个写法面向类，而guava面向方法
    }
}
